<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix="c"%>

<h2>学生列表</h2>
<a href="${pagecontext.request.contextPath}/toAdd">添加</a>
<a href="${pagecontext.request.contextPath}/listGrade">成绩列表</a>
<table border="1">
    <tr>
        <td>ID</td>
        <td>姓名</td>
        <td>年龄</td>
        <td>性别</td>
        <td>创建时间</td>
        <td>更新时间</td>
        <td>操作</td>
    </tr>
    <c:forEach items="${students}" var="s" varStatus="st">
        <tr>
            <td>${s.id}</td>
            <td>${s.name}</td>
            <td>${s.age}</td>
            <td>${s.sex}</td>
            <td>${s.createdate}</td>
            <td>${s.updatadate}</td>
            <td>
                 <a href="${pageContext.request.contextPath}/delete?id=${s.id}">删除</a>
                 <a href="${pageContext.request.contextPath}/toUpdata?id=${s.id}">修改</a>
            </td>
         </tr>
    </c:forEach>
</table>